package com.tencreat.common.enums;


import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;

/**
 * 通用性别枚举
 * @author huangwei
 */
@Getter
public enum Sex  {

    /**
     * 性别枚举
     */
    NOT(0,"未知"),
    MAN(1,"男"),
    WOMAN(2,"女");
    Sex(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    @EnumValue
    private final int value;
    @JsonValue
    private String desc;

    /**
     * 单个枚举的展示
     */
    @Override
    public String toString() {
        return value + "-" + desc;
    }
}
